x86/VPMU: handle APIC_LVTPC accesses
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 3 Feb 2015 10:30:40 +0000 (11:30 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Feb 2015 10:30:40 +0000 (11:30 +0100)
commit24fdc89e48b737d5131863621df56cb76914ffba
tree5d7d9cab4b4cc96fb2fea64c874336903e2b91bf
parente5e09b5c46444b0ab8450c6d6ee8316d4016ac18
x86/VPMU: handle APIC_LVTPC accesses

Don't have the hypervisor update APIC_LVTPC when _it_ thinks the vector
should be updated. Instead, handle guest's APIC_LVTPC accesses and write what
the guest explicitly wanted (but only when VPMU is enabled).

This is updated version of commit 8097616fbdda that was reverted by
cc3404093c85. Unlike the previous version, we don't update APIC_LVTPC
when VPMU is disabled to avoid interfering with NMI watchdog (which
runs only when VPMU is off).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/svm/vpmu.c
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/hvm/vmx/vpmu_core2.c
xen/arch/x86/hvm/vpmu.c
xen/include/asm-x86/hvm/vpmu.h